Fix silent brute force fallback at aligned vector dimensions - #2483
Fix silent brute force fallback at aligned vector dimensions#2483imotov wants to merge 2 commits into
Conversation
cuvsDatasetMakePadded rejects a device matrix already at CAGRA's required stride, so every field whose dimension is a multiple of four failed its CAGRA build and was silently indexed as brute force. Pick the factory that matches the layout, and log the fallback so the next one is visible. See NVIDIA#2482
|
/ok to test c87fcd4 |
| info( | ||
| infoStream, | ||
| COMPONENT, | ||
| "CAGRA build failed for field \"" | ||
| + fieldInfo.name | ||
| + "\", falling back to a brute force index: " | ||
| + t); |
|
I see what you're doing here; I'm generally 👍. But I think what you've mentioned in #2482 is a serious point: It does feel like there is room to iron out the API a little better. Leaving it to the caller to remember to call
We can check this in now. But I'm wondering if we should consider a more foolproof approach in the future. I toyed with the idea of making
This will allow us to have
The consumption code would look something like: var tuple = index.makePaddedDatasetView(deviceVectors);
try (
var dataset = tuple.first();
var view = tuple.second()
) {
index.updateDataset(view);
index.serialize(os);
}Does something like that make sense for the future? |
mythrocks
left a comment
There was a problem hiding this comment.
Generally 👍. A design consideration suggested for the future.
|
/ok to test 2cb1b39 |
cuvsDatasetMakePadded rejects a device matrix already at CAGRA's required stride, so every field whose dimension is a multiple of four failed its CAGRA build and was silently indexed as brute force. Pick the factory that matches the layout, and log the fallback so the next one is visible.
See #2482